/**
 * 
 */

package com.shy.base.vo;

/**
 * <p>
 * Title: EasyuiResult
 * </p>
 * <p>
 * Description: Easyui框架ajax提交返回結果封裝类
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author H2013788
 * @date 2017/9/29下午2:14:20
 */
public class EasyuiResult {

    private static final boolean TYPE_SUCCESS = true;
    private static final boolean TYPE_ERROR = false;

    private boolean success; // 交互状态
    private String message; // 提示信息
    private String callback; // 囘調方法
    private String tabId; // 刷新標籤頁

    /**
     * @param success
     * @param message
     */
    public EasyuiResult(boolean success, String message) {
        super();
        this.success = success;
        this.message = message;
    }

    /**
     * @param success
     * @param message
     * @return
     * @author H2013788
     * @date 2017/9/29下午3:41:40
     */
    public static EasyuiResult CreateEasyuiSuccessResult(String message) {
        return new EasyuiResult(TYPE_SUCCESS, message);
    }

    /**
     * @param success
     * @param message
     * @return
     * @author H2013788
     * @date 2017/9/29下午3:41:40
     */
    public static EasyuiResult CreateEasyuiErrorResult(String message) {
        return new EasyuiResult(TYPE_ERROR, message);
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getCallback() {
        return callback;
    }

    public void setCallback(String callback) {
        this.callback = callback;
    }

    public String getTabId() {
        return tabId;
    }

    public void setTabId(String tabId) {
        this.tabId = tabId;
    }

}
